import {useDrag} from "react-dnd";

function getDragRef(defaultConfig){
    const [,dragref] = useDrag({
        item: {
            type: 'box',
            dragItem: defaultConfig
        },
        collect: monitor => ({
            isDragging: monitor.isDragging(),
        }),
    });

    return dragref;
}
export default{
    getDragRef:getDragRef
}